#include <iostream>
#include <set>

int main()
{
    int l_k;
    std::cin >> l_k;
    std::string str;
    std::cin >> str;

    std::set<char> C = {'a', 'e', 'i', 'o', 'u', 'A', 'E', 'I', 'O', 'U'};

    int l = 0;
    int r = 0;
    int cnt = 0;
    int max_len = 0;
    while (r < str.size())
    {
        if (C.count(str[r]) == 0)
        {
            cnt++;
        }
        if (cnt > l_k)
        {
            while (l <= r && cnt > l_k)
            {
                if (C.count(str[l]) == 0)
                {
                    cnt--;
                }
                l++;
            }
        }

        if (cnt == l_k)
        {
            std::cout << l << " " << r << " " << std::endl;
            max_len = std::max(r - l + 1, max_len);
        }
        r++;
    }

    std::cout << max_len << std::endl;
    return 0;
}